<template>
  <view  class="input-search" :style="{'backgroundColor':bgcolor}" @click="goSearch">
   <view class="input-container" :style="{'border-radius':borderRadius + 'rpx'}">
    <uni-icons type="search" size="20"></uni-icons>
    <text class="text">搜索</text>
   </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    props:{
      bgcolor:{
        type:String,
        default:'#c00000'
      },
      borderRadius:{
        type:Number,
        default:40
      }
    },
    data() {
      return {
        
      };
    },
    methods:{
      goSearch(){
        uni.navigateTo({
          url:'/subpkg/search/search',
        })
      }
    }
  }
</script>

<style lang="scss">
.input-search{
  height: 110rpx;
  display: flex;
  justify-content: space-around;
  align-items: center;
 .input-container{
    background-color: #fff;
    width: 90%;
    height: 80rpx;
    padding: 0 15rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    .text{
      font-size: 30rpx;
      margin-left: 8rpx;
    }
  }
}
</style>